public class java20240321 {

    public static void main(String[] args) {
        String s1 = "hello";
        String s2 = "abc";
        String s3 = "ab";
        System.out.println(s1.compareTo(s2));
        System.out.println(s2.compareTo(s3));


    }

    public static void main1(String[] args) {
       String str = "Hello word";
       String ret = str.replace('l' ,'e');
       String ret1 = str;
       String ret3 = new String("hello rongyi");


        char[] art ={'h','e','l','l','o','w','o','r','d'};
        String ret2 =new String(art);
/*
        System.out.println(ret2);
       int index = str.indexOf('l');
        System.out.println(index);*/
        //System.out.println(ret);
        //System.out.println(ret1);
        /*System.out.println(ret);
        System.out.println(ret3.length());
        System.out.println(ret3.isEmpty());
        System.out.println("rongyi".length());*/

        String s1 = "hello";
        String s2 = "hello";
        String s3 = "word";
        /*System.out.println(s1.equals(s2));
        System.out.println(s1.equals(s3));
        System.out.println(s1 == s2);*/
        String a1 = new String("hello");
        String a2 = new String("hello");

        String a3 = a1;
        //System.out.println(a1.equals(s1));

        //System.out.println(a1.equals(a2));
        //System.out.println(a1 == s1);
        //System.out.println(a3);
        //System.out.println(a3 == a1);


    }
}
